package Book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-02-16
 * Time: 01:43
 */
public class Book {
    private String name;
    private String author;
    private int price;
    private String type;
    private boolean isBoolean;

    public Book(String name, String author, int price, String type,boolean isBoolean) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
        this.isBoolean = isBoolean;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public boolean getBoolean() {
        return isBoolean;
    }

    public void setBoolean(boolean aBoolean) {isBoolean = aBoolean;}

    @Override
    public String toString() {
        return "Book{" +
                "书名:" + name +
                ", 作者:" + author +
                ", 价格:" + price +
                ", 类型:" + type +
                ((isBoolean) ? "  已借阅" : "  未借阅");
    }
}
